-
Notifications
You must be signed in to change notification settings - Fork 0
64 make a seperate screen for joining a lobby using a code #65
Merged
raavocat
merged 74 commits into
main
from
64-make-a-seperate-screen-for-joining-a-lobby-using-a-code
Apr 13, 2026
Merged
64 make a seperate screen for joining a lobby using a code #65
raavocat
merged 74 commits into
main
from
64-make-a-seperate-screen-for-joining-a-lobby-using-a-code
Apr 13, 2026
+9,278
−2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Database layer
#52, #53) - Track all Firebase listeners via cleanup runnables in AndroidFirebase - Add removeAllListeners() to FirebaseAPI interface - Add stop() to GameNetworkHandler, called from GameScreen hide/dispose - Fix confirmSetup: propagate errors to onError callback instead of silently calling onSuccess on failure paths - Update SetupFlowController to pass error callback to confirmSetup
- Add CircuitBreaker class in new network package with three states: CLOSED (requests pass), OPEN (requests blocked), HALF_OPEN (one probe) - Trips after 3 consecutive heartbeat failures, 10s cooldown before probe - Integrate into GameNetworkHandler: gates saveMove and sendHeartbeat - Connection UI reflects breaker state (Disconnected/Reconnecting/latency)
Route all database calls through state classes instead of calling DatabaseManager directly from screen helpers. - LobbyState: add validateLobby, listenForOpponentReady, startGame, listenForGameStart wrapper methods - SetupState: add confirmSetup, unconfirmSetup, listenForBothSetupReady, getOpponentBoard, getFirebaseApi wrapper methods - LobbyValidator: route through LobbyState instead of DatabaseManager - LobbyFlowController: route through LobbyState - SetupFlowController: route through SetupState - GameNetworkHandler: accept FirebaseAPI via constructor injection - Thread LobbyState through MainMenuScreen→MainMenuUI→JoinGamePanel - Thread FirebaseAPI through SetupScreen→GameScreen→GameNetworkHandler Result: zero DatabaseManager references in screens/ package
refactor: enforce GUI→Logic→Database layer separation
fix: add listener lifecycle management and confirmSetup error handling
feat: implement circuit breaker with closed/open/half-open states
The game now allows you to reconnect to a game, but if it takes more than 10 seconds the game is auto forfeited. Both players latency is now displayed
Improve circuitbreak
…lobby-and-setup Add heartbeat/circuitbreak to lobby and setup
Sign in
to join this conversation on GitHub.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.